<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnTypeInDelayOrderTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('delay_order_task')
            ->changeColumn('type', 'enum', ['values' => 'request_delay,today_done,demand_order', 'default' => 'request_delay', 'comment' => '延期任务类型(申请延期 request_delay, 今日完成 today_done,需求单 demand_order)'])
            ->save();
    }

    public function down()
    {
        $this->table('delay_order_task')
            ->changeColumn('type', 'enum', ['values' => 'request_delay,today_done', 'default' => 'request_delay', 'comment' => '延期任务类型(申请延期 request_delay, 今日完成 today_done)'])
            ->save();
    }
}
